package com.beta.mapper;

import com.baomidou.mybatisplus.mapper.AutoMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.beta.dto.order.OrderItemDto;
import com.beta.dto.order.RefundItemDto;
import com.beta.entity.OrderItems;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * OrderItems 表数据库控制层接口
 */
public interface OrderItemsMapper extends AutoMapper<OrderItems> {

    OrderItemDto getOrdersItemById(@Param("id") Integer orderItemId);

    List<OrderItemDto> getOrdersItems(@Param("orderIds") List<Integer> orderIds);

    List<OrderItemDto> getOrderItemsByCartItemIds(@Param("cartItemsId") List<Integer> cartItemsId);

    List<RefundItemDto> selectPageRefundItemsWithStatus(Page<RefundItemDto> page, @Param("userId") Integer userId, @Param("status") String status);

    List<RefundItemDto> selectPageRefundItems(Page<RefundItemDto> page, @Param("userId") Integer userId);

    OrderItemDto getOrderItem(@Param("orderItemId") Integer orderItemId, @Param("userId") Integer userId);

}